package com.yzw.controller;

import com.yzw.util.RedisUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author yzw
 * @date 2022/7/9 23:16
 * @desc
 */
@RestController
public class DemoController {
    @Resource
    private RedisUtil redisUtil;
    @GetMapping("/test")
    public String test(String name){
        return name;
    }

    /*@GetMapping("/rpush")
    public String rpush(String name){
        redisUtil.rpush(name);
        return name;
    }*/

    @GetMapping("/blpop")
    public String blpop(){
        return redisUtil.blpop();
    }

    @GetMapping("/lpop")
    public Object lpop(){
        return redisUtil.lpop();
    }
}
